<?php 

header("Content-type: text/html; charset=utf-8"); 
include "TopSdk.php"; 
//将下载SDK解压后top里的TopClient.php第8行$gatewayUrl的值改为沙箱地址:http://gw.api.tbsandbox.com/router/rest, 
//正式环境时需要将该地址设置为:http://gw.api.taobao.com/router/rest 

//实例化TopClient类 
$c = new TopClient; 
$c->appkey = "21326221"; 
$c->secretKey = "92ea88fa9391fe817cdfe152bcdcff07"; 

echo "1";
$req = new ItemAddRequest;
$req->setNum(30);
$req->setPrice("200.07");
$req->setType("fixed");
echo "1";
$req->setStuffStatus("new");
$req->setTitle("Nokia N97全新行货");
$req->setDesc("这是一个好商品");
$req->setLocationState("浙江");
$req->setLocationCity("杭州");
$req->setApproveStatus("onsale");
echo "1";
$req->setCid(50014909);
$resp = $c->execute($req, "6100a25cb5289ac614833379d736f3c8c1882cf5434d730112463565");

var_dump($resp);

